<h1>New incident</h1>

<% form_for(@incident) do |f| %>
  <%= f.error_messages %>
	
	<p>
    <%= f.label :machine_id %><br />
    <%= f.select :machine_id, Machine.find(:all,:order=>'nom_machine').collect{|c| [c.nom_machine,c.id]} %>
  </p>
  
  <p>
    <%= f.label :type_incident_id %><br />
	<%= f.select :type_incident_id, TypeIncident.find(:all,:order=>'designation').collect{|c| [c.designation,c.id]} %>
  </p>
  
  <p>
    <%= f.label :Info_complementaire%><br />
	<%= text_area(:incident, :info_complementaire, :cols => 40, :rows => 5, :class => 'textarea')%>

  </p>
  
  <p>
    <%= f.label :date_detection %><br />
    <%= f.datetime_select :date_detection %>
  </p>
 
  <p>
    <%= f.submit 'Cr&eacute;er' %>
  </p>
<% end %>

<%= link_to 'Back', incidents_path %>